package com.niit.session15;

public class UserService {

	public void register(String username, String password, String email, String phone) {
		boolean eamil = Validate.isEamil(email);
		if(!eamil) {
			System.out.println("邮箱格式错误！");
			return;
		}
		if(!Validate.isPhone(phone)) {
			System.out.println("手机号码格式错误！");
			return;
		}
		System.out.println("注册成功！");
	}
	
	public static void main(String[] args) {
		UserService userService = new UserService();
		userService.register("Trout", "123456", "354981@qq.com", "13777953652");
	}

}
